<script>
	const api = require('@/config/api');
	const util = require('@/utils/util');
	export default {
		onLaunch: function() {
			//获取设备信息
			let that = this;
			uni.getSystemInfo({
				success: function success(res) {
					if (res.platform == 'ios' || res.platform == 'android') {
						that.globalData.isPc = false;
					} else {
						that.globalData.isPc = true;
					}				
					that.globalData.windowHeight = res.windowHeight;
					that.globalData.screenHeight = res.screenHeight;
					that.globalData.statusBarHeight = res.statusBarHeight;
				}
			})
			let titleHeight = uni.getMenuButtonBoundingClientRect();
			if(titleHeight.height) that.globalData.titleBarHeight = titleHeight.height + 12;
			const updateManager = uni.getUpdateManager();
			updateManager.onCheckForUpdate(function(res) {
				console.log(res.hasUpdate);
			});
			updateManager.onUpdateReady(function(res) {
				updateManager.applyUpdate();
			});
		},
		onShow: function() {
			let that = this;
			util.loginNowNew().then(function(res) {
				that.$isResolve();
				util.getMessageCount();
			});
			util.request(api.configUrl).then(function(res) {
				uni.setStorageSync('config', res.data);
			})
		},
		methods: {

		},
		onHide: function() {},
		globalData: {
			dw: 0,
			isPc: false,
			windowHeight: 0,
			titleBarHeight: 0,
			screenHeight: 0,
			statusBarHeight: 0,
			shareTitle: api.AppTitle,
			isNoteShop: !1,
		}
	}
</script>

<style lang="scss">
.df {
    display: flex;
    align-items: center
}

.bfw {
    background: rgba(255, 255, 255, .95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px)
}

.bf8 {
    background: rgba(248, 248, 248, .95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px)
}

.bfh {
    background: rgba(0, 0, 0, .85);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px)
}

.xwb {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25))
}

.ohto {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.ohto2 {
    display: block;
    white-space: pre-line;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical
}

.microlabel {
    position: absolute;
    width: 16rpx;
    height: 16rpx;
    border-radius: 50%;
    background: #fa5150;
    border-width: 4rpx;
    border-style: solid;
    border-color: #fff
}

.empty-box {
    width: 100%;
    padding: 160rpx 0;
    flex-direction: column;
    justify-content: center
}

.empty-box image {
    width: 160rpx;
    height: 160rpx
}

.empty-box .e1 {
    padding: 20rpx 0 10rpx;
    font-size: 26rpx;
    font-weight: 600
}

.empty-box .e2 {
    color: #999;
    font-size: 20rpx;
    font-weight: 300
}

button:after {
    border-radius: 0;
    border: none
}

::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    color: transparent
}

img,
[alt],
img[alt] {
    max-width: 100%;
    height: auto;
    display: block
}

.heio {
    justify-content: center;
    overflow: hidden;
    transition: height .45s ease-in-out
}

@keyframes fadeIn {
    0% {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1
    }

    to {
        opacity: 0
    }
}

.fade-in {
    animation: fadeIn .3s ease
}

.fade-out {
    animation: fadeOut .3s ease
}

.tips-box {
    margin-top: 12vh;
    width: 100%;
    justify-content: center
}

.tips-box .tips-item {
    padding: 0 50rpx;
    height: 100rpx;
    line-height: 100rpx;
    font-size: 24rpx;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, .85);
    border-radius: 50rpx
}

.animate {
    animation: wobble 1.5s .15s linear infinite
}

@keyframes wobble {
    10% {
        transform: rotate(15deg)
    }

    20% {
        transform: rotate(-10deg)
    }

    30% {
        transform: rotate(5deg)
    }

    40% {
        transform: rotate(-5deg)
    }

    50%,
    to {
        transform: rotate(0)
    }
}

.hi {
    animation: likes .45s ease-in-out
}

@keyframes likes {
    0% {
        transform: scale(1)
    }

    25% {
        transform: scale(1.2)
    }

    50% {
        transform: scale(.95)
    }

    to {
        transform: scale(1)
    }
}

.effect {
    animation: btnEffect 3s both infinite
}

@keyframes btnEffect {
    0% {
        transform: translate(0)
    }

    10% {
        transform: translate(4px)
    }

    20% {
        transform: translate(-2px)
    }

    30% {
        transform: translate(4px)
    }

    40% {
        transform: translate(-2px)
    }

    50% {
        transform: translate(0)
    }
}

.bUp {
    animation: bottomUp .6s ease
}

@keyframes bottomUp {
    0% {
        bottom: -240rpx
    }

    to {
        bottom: 0
    }
}

page::after {
    position: fixed;
    content: '';
    left: -1000px;
    top: -1000px;
    -webkit-animation: shadow-preload .1s;
    -webkit-animation-delay: 3s;
    animation: shadow-preload .1s;
    animation-delay: 3s
}

@-webkit-keyframes shadow-preload {
    0% {
        background-image: url(https://cdn1.dcloud.net.cn/51304a454d6a6c4752673d3d/img/shadow-grey.png)
    }

    100% {
        background-image: url(https://cdn1.dcloud.net.cn/51304a454d6a6c4752673d3d/img/shadow-grey.png)
    }
}

@keyframes shadow-preload {
    0% {
        background-image: url(https://cdn1.dcloud.net.cn/51304a454d6a6c4752673d3d/img/shadow-grey.png)
    }

    100% {
        background-image: url(https://cdn1.dcloud.net.cn/51304a454d6a6c4752673d3d/img/shadow-grey.png)
    }
}

page {
    --status-bar-height: 25px;
    --top-window-height: 0px;
    --window-top: 0px;
    --window-bottom: 0px;
    --window-left: 0px;
    --window-right: 0px;
    --window-magin: 0px
}

[data-c-h="true"] {
    display: none !important;
}
</style>